//
//  HerosInfoScreen.h
//  FruitCrush
//
//  Created by gaoyu on 15/7/28. 
//
//

#ifndef __FruitCrush__HerosInfoScreen__
#define __FruitCrush__HerosInfoScreen__
#include "cocos2d.h"
#include "HeroData.h"
#include "HeroBeauty.h"
#include "HeroFighter.h"
#include "TitleMenuItem.h"
#include "GoldSaveModel.h"
USING_NS_CC;

class HerosInfoScreen : public cocos2d::Node
{
public:
    HerosInfoScreen();
    static cocos2d::Scene* createScene();
    CREATE_FUNC(HerosInfoScreen);
    virtual bool init() override;
    
private:
    int heroType;

    LabelTTF* HealthLabel;
    LabelTTF* SwordLabel;
    LabelTTF* FireLabel;
    LabelTTF* ArrowLabel;
    LabelTTF* LightLabel;

    LabelTTF* HealthGoldLabel;
    LabelTTF* SwordGoldLabel;
    LabelTTF* FireGoldLabel;
    LabelTTF* ArrowGoldLabel;
    LabelTTF* LightGoldLabel;

    LabelTTF* itemFightButtonLabel;

    void bgInit();
    void menuInit();
    void heroInit();
    void upButtonInit(Point midPos);
    void goldIconInit(Point midPos);
    void goldLabelInit(Point midPos,HeroData *mHeroData);
    void bottomButtonInit(Point midPos);
    void propertyIconInit(Point midPos);

    void menuCallback(Ref *sender);
    void onClickWithHealth(Ref *sender);
    void onClickWithSword(Ref *sender);
    void onClickWithFire(Ref *sender);
    void onClickWithArrow(Ref *sender);
    void onClickWithLight(Ref *sender);
    void popupLayer();

    void initHealthLabel(Point midPos, HeroData *mHeroData);
    void initSwordLabel(Point midPos, HeroData *mHeroData);
    void initFireLabel(Point midPos, HeroData *mHeroData);
    void initArrowLabel(Point midPos, HeroData *mHeroData);
    void initLightLabel(Point midPos, HeroData *mHeroData);

    int setGoldHelp(int type, Ref *sender, HeroData *mHeroData);
};

#endif /* defined(__FruitCrush__HerosInfoScreen__) */
